import { DictVO } from '@/common/vo';
import Axios from '@/utils/request';
import { MonitorRuleDTO, MonitorRuleSubmitFormDTO, MonitorRuleRepVO } from '../vo/monitor-rule-setting';

export default class API {
    /**
     * 查询数据监控规则管理列表
     * @source 
     */
    static getMonitorRuleList(data: MonitorRuleDTO): Promise<MonitorRuleRepVO> {
        return Axios.post('/audit/dataMonitorRule/queryDataMonitorRuleList', data)
    }

    /**
     * 查询ID查询数据监控规则详情
     */
    static getMonitorRuleDetail(id: string): Promise<any> {
        return Axios.post(`/audit/dataMonitorRule/queryDataMonitorRuleDetailById/${id}`)
    }

    /**
     * 新增监控规则
     */
    static addMonitorRule(data: MonitorRuleSubmitFormDTO): Promise<any> {
        return Axios.post('/audit/dataMonitorRule/addDataMonitorRuleInfo', data)
    }

    /**
     * 修改监控规则
     */
    static editMonitorRule(data: MonitorRuleSubmitFormDTO): Promise<any> {
        return Axios.post('/audit/dataMonitorRule/updateDataMonitorRuleInfo', data)
    }

    /**
     * 删除监控规则
     */
    static deleteMonitorRule(data: string[]): Promise<any> {
        return Axios.post('/audit/dataMonitorRule/deleteDataMonitorRuleInfo', { idList: data })
    }

    /**
     * 修改监控规则启用状态
     */
    static updateStatus(data: string[], status): Promise<any> {
        return Axios.post('/audit/dataMonitorRule/setStatus', { idList: data, status })
    }

    /**
     * 获取预设模板 邮件收件人人
     */
    static getSystemValue(data): Promise<any> {
        return Axios.post('/system/querySystemValue', data)
    }
}
